﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;


namespace DA
{
    public class ConnectionDB
    {
        //Chuỗi kết nối
       // string str = @"Data Source=PES-PC\SQLEXPRESS;Initial Catalog=ThoiTrang;Integrated Security=True";
        string str = @"Data Source=PES-PC\SQLEXPRESS;Initial Catalog=ThoiTrang;Integrated Security=True";
        SqlConnection cn = null;
        SqlCommand cmd = null;
        
        public ConnectionDB()
        {
            try
            {
                cn = new SqlConnection(str);
                cn.Open();
                Cmd = new SqlCommand();
                Cmd.CommandType = CommandType.Text;
                Cmd.Connection = cn;
               
            }
            catch (Exception)
            {
                
                throw;
            }
        }
        public SqlCommand Cmd
        {
            get { return cmd; }
            set { cmd = value; }
        }

    }
}
